<template>
  <div>
    <!-- 头部导航 -->
    <van-nav-bar title="砍价列表" left-arrow @click-left="onClickLeft" />
    <!-- 商品 -->

    <van-card
      num="2"
      :price="item.minPrice"
      :desc="item.name"
      :title="item.name"
      :thumb="item.pic"
      v-for="(item, index) in getStoreList"
      :key="index"
      v-show="index >= 5"
      @click="oncome(item, id)"
    />
  </div>
</template>

<script>
export default {
  data() {
    return {
      getStoreList: [],
    };
  },
  //点击箭头 返回到页面
  methods: {
    onClickLeft() {
      this.$router.go(-1);
    },
    oncome(id) {
      // console.log('1234');
      this.$router.push({
        path: "/Recommend_detail",
        query: {
          id,
        },
      });
    },
  },
  mounted() {
    this.$API.getStoreList().then((res) => {
      console.log(res);
      this.getStoreList = res.data.data;
    });
  },
};
</script>

<style>
</style>